import Layout from '@/views/Layout.vue'
import Index from '@/views/seconds/Index.vue'
import News from '@/views/seconds/News.vue'
import Search from '@/views/seconds/Search.vue'
import My from '@/views/seconds/My.vue'

import Detail from '@/views/Detail.vue'
import Register from '@/views/Register.vue'
import Login from '@/views/Login.vue'
import CityList from '@/views/CityList.vue'
import Collect from '@/views/Collect.vue'
import PublishHouse from '@/views/PublishHouse.vue'
import Community from '@/views/Community.vue'
import Map from '@/views/Map.vue'
import HireList from '@/views/HireList.vue'
const routes = [
  {
    path: '/',
    component: Layout,
    redirect:'/index',
    children: [
      {
        path: 'index',
        component:Index
      },
      {
        path: 'news',
        component:News
      },
      {  
        name:'search',
        path: 'search',
        component:Search
      },
      {
        path: 'my',
        component:My
      },
    ]
  },
  {
    name:'detail',
    path: '/detail',
    component:Detail
  },
  {
    path: '/register',
    component:Register
  },
  {
    path: '/login',
    component:Login
  },
  {
    name:'cityList',
    path: '/cityList',
    component:CityList
  },
  {
    name:'collect',
    path: '/collect',
    component:Collect
  },
  {
    name:'publishHouse',
    path: '/publishHouse',
    component:PublishHouse
  },
  {
    name:'community',
    path: '/community',
    component:Community
  },
  {
    name:'map',
    path: '/map',
    component:Map
  },
  {
    name:'hireList',
    path: '/hireList',
    component:HireList
  },
]

export default routes